﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Model_SSResourceManager
{
    public class Message : BaseModel
    {
        public Guid UserId { get; set; }
        public String MessageText { get; set; }
        public DateTime CreateTime { get; set; }
        public DateTime? SendedEmail { get; set; }
        public DateTime? SendedSkype { get; set; }

        private bool m_EmailOk;
        public bool EmailOk
        {
            get
            {
                return m_EmailOk;
            }
            set
            {
                m_EmailOk = value;
                SetSendOk();
            }
        }

        private bool m_SkypeOk;
        public bool SkypeOk 
        { 
            get 
            {
                return m_SkypeOk;
            }
            set
            {
                m_SkypeOk = value;
                SetSendOk();
            }    
        }
        public bool SendOk { get; private set; }
        private void SetSendOk()
        {
            SendOk = m_SkypeOk && m_EmailOk;
        }
    }
}
